package com.itheima.dao;

import com.itheima.domain.User;
import org.springframework.dao.EmptyResultDataAccessException;

import java.util.List;

public interface UserDao {

    List<User> findAll();

    Long save(User user);

    void saveUserAndRole(Long uid, Long[] roleIds);

    void delUserAndRole(Long uid);

    void del(Long uid);

    User findByUsernameAndPassword(String username, String password) throws EmptyResultDataAccessException;
}
